.agent-mode {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow-y: auto;
  background: #f0f2f5;
  padding: 16px;
  min-height: 0;
  height: 100%;
  position: relative;
  gap: 16px;
}

.agent-mode::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.agent-mode::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}

.agent-mode::-webkit-scrollbar-track {
  background: transparent;
}

/* 用户消息样式 */
.message.user {
  align-self: flex-end;
  max-width: 80%;
  margin: 4px 0;
  background: #e6f7ff;
  border-radius: 12px 12px 2px 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.message.user .message-header {
  padding: 4px 12px;
  border-bottom: 1px solid #e8e8e8;
  display: flex;
  align-items: center;
  gap: 8px;
}

.message.user .message-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
}

.message.user .message-avatar .anticon {
  font-size: 14px;
  color: #1890ff;
}

.message.user .message-content {
  padding: 1px;
  white-space: pre-wrap;
  word-wrap: break-word;
  word-break: break-all;
}

.message.user .message-time {
  font-size: 12px;
  color: #666;
  margin-left: 8px;
}

/* AI助手消息样式 */
.agent-message {
  align-self: flex-start;
  max-width: 80%;
  min-width: 330px;
  margin: 4px 0;
  background: #fff;
  border-radius: 12px 12px 12px 2px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
}

.agent-message .status-indicator {
  padding: 4px 12px;
  border-bottom: 1px solid #e8e8e8;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  flex-shrink: 0;
}

.agent-message .message-content {
  max-height: 60vh;
  overflow-y: auto;
  padding: 12px;
  margin-left: -5px;
  flex: 1;
}

.agent-mode::-webkit-scrollbar,
.agent-message .message-content::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.agent-mode::-webkit-scrollbar-thumb,
.agent-message .message-content::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}

.agent-mode::-webkit-scrollbar-track,
.agent-message .message-content::-webkit-scrollbar-track {
  background: transparent;
}

.agent-message .status-indicator.thinking,
.agent-message .status-indicator.executing,
.agent-message .status-indicator.analyzing {
  background: #e6f7ff;
  color: #1890ff;
}

.agent-message .status-indicator.waiting {
  background: #fffbe6;
  color: #faad14;
}

.agent-message .status-indicator.completed {
  background: #f6ffed;
  color: #52c41a;
}

.agent-message .status-indicator.error {
  background: #fff1f0;
  color: #ff4d4f;
}

.agent-message .content-item {
  padding: 5px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.02);
  margin-bottom: 12px;
  width: 100%;
}

.agent-message .content-item:last-child {
  margin-bottom: 0;
}

.agent-message .command-block {
  background: #fff;
  border-radius: 8px;
  padding: 10px;
  margin-top: 12px;
  width: 100%;
  border: 1px solid #f0f0f0;
}

.agent-message .command-block .command-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.agent-message .command-block .description {
  font-size: 13px;
  color: #595959;
  flex: 1;
  margin-right: 1px;
}

.agent-message .command-block .command-text {
  font-family: monospace;
  background: #f8f9fa;
  padding: 12px 16px;
  border-radius: 4px;
  font-size: 13px;
  color: #333;
  margin: 12px 0;
  width: 100%;
  border: 1px solid #f0f0f0;
}

.agent-message .command-block .command-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.agent-message .command-block .command-actions button {
  font-size: 12px;
  padding: 0 12px;
  height: 28px;
}

.agent-message .risk-badge {
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  color: #fff;
}

.agent-message .risk-badge.high {
  background: #ff4d4f;
}

.agent-message .risk-badge.medium {
  background: #faad14;
}

.agent-message .risk-badge.low {
  background: #52c41a;
}

.agent-message .analysis-block {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 4px;
  padding: 10px;
  margin-top: 2px;
  width: 100%;
  border: 1px solid #e6f7ff;
}

.agent-message .analysis-block .analysis-title {
  font-weight: 500;
  margin-bottom: 8px;
  color: #1890ff;
}

.agent-message .result-block {
  font-size: 13px;
  line-height: 1.6;
  color: #389e0d;
  background: #f6ffed;
  padding: 8px;
  border-radius: 4px;
  margin-top: 12px;
  width: 100%;
  border: 1px solid #b7eb8f;
}

.agent-message .error-block {
  font-size: 13px;
  line-height: 1.6;
  color: #cf1322;
  background: #fff1f0;
  padding: 8px;
  border-radius: 4px;
  margin-top: 12px;
  width: 100%;
  border: 1px solid #ffccc7;
}

.agent-message .error-block .error-title {
  font-weight: 500;
  margin-bottom: 8px;
  color: #ff4d4f;
}